FROM openshift/ose-installer:v4.10.0.20220224.064623 AS builder
ENV __doozer=update BUILD_RELEASE=202202240423.p0.g4d1e087.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202240423.p0.g4d1e087.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=4d1e087 OS_GIT_VERSION=4.10.0-202202240423.p0.g4d1e087.assembly.stream-4d1e087 SOURCE_DATE_EPOCH=1639531135 SOURCE_GIT_COMMIT=4d1e087ed00fddbab16a8cf8fe22d0cce4fef025 SOURCE_GIT_TAG=4d1e087 SOURCE_GIT_URL=https://github.com/openshift/machine-os-images 

ARG DIRECT_DOWNLOAD=false

USER root:root

RUN dnf install -y jq wget coreos-installer
COPY fetch_image.sh /usr/local/bin/
RUN /usr/local/bin/fetch_image.sh


FROM openshift/ose-base:v4.10.0-202202160023.p0.g544601e.assembly.stream
ENV __doozer=update BUILD_RELEASE=202202240423.p0.g4d1e087.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202240423.p0.g4d1e087.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=4d1e087 OS_GIT_VERSION=4.10.0-202202240423.p0.g4d1e087.assembly.stream-4d1e087 SOURCE_DATE_EPOCH=1639531135 SOURCE_GIT_COMMIT=4d1e087ed00fddbab16a8cf8fe22d0cce4fef025 SOURCE_GIT_TAG=4d1e087 SOURCE_GIT_URL=https://github.com/openshift/machine-os-images 

COPY --from=builder /usr/bin/coreos-installer /usr/bin/
COPY --from=builder /output/coreos/* /coreos/

COPY scripts/* /bin/

# Include this container in the release image payload

LABEL \
        io.openshift.release.operator="true" \
        name="openshift/ose-machine-os-images" \
        com.redhat.component="ose-machine-os-images-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Bare Metal Hardware Provisioning" \
        io.openshift.maintainer.subcomponent="OS Image Provider" \
        release="202202240423.p0.g4d1e087.assembly.stream" \
        io.openshift.build.commit.id="4d1e087ed00fddbab16a8cf8fe22d0cce4fef025" \
        io.openshift.build.source-location="https://github.com/openshift/machine-os-images" \
        io.openshift.build.commit.url="https://github.com/openshift/machine-os-images/commit/4d1e087ed00fddbab16a8cf8fe22d0cce4fef025" \
        version="v4.10.0"

